/*
 * @Author: Bernard liangyongkang@lspace.vip
 * @Date: 2024-03-25 15:03:05
 * @LastEditors: Bernard liangyongkang@lspace.vip
 * @LastEditTime: 2024-03-25 16:11:29
 * @FilePath: \graduation-design\front\src\components\virtualwaterfall\components\card\index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { FC } from 'react';
import { Image, } from 'antd';
import { ICardItem } from '../../type/index.ts';
import './index.less';
import defaultImg from '@/assets/123.jpg';



const MyCard: FC<ICardItem> = (props) => {
  const { bgColor, title, author, img_url } = props;
  return (
    <div style={{ backgroundColor: bgColor }} className="card-view">
      <div className="card-img">
        <Image src={img_url || defaultImg} preview={false} />
      </div>
      <div className="info">
        <div className="title">{title}</div>
        <div className="author">
          <span>作者：</span>
          <span>{author}</span>
        </div>
      </div>
    </div>
  );
};

export default MyCard;
